<template>
  <a-modal
    v-model:open="props.outVisible"
    :dialogStyle="{ padding: 0 }"
    :width="450"
    :height="200"
    :closable="false"
    :footer="false"
    title="是否保存实验"
  >
    <div class="dialog-main">
      <div class="dialog-content">
        当前实验暂未保存，是否在关闭前保存当前实验进度？
      </div>
    </div>
    <div class="dialog-footer">
      <a-button type="primary" @click="handleSave">是</a-button>
      <a-button type="primary" style="margin: 0 12px;" danger @click="handleOut">否</a-button>
      <a-button  @click="handleCancel">取消</a-button>
    </div>
  </a-modal>
</template>
<script setup>
const props = defineProps({
  outVisible: Boolean,
});
const emit = defineEmits(["handleSave", "handleOut", "handleCancel"]);
const handleSave = () => {
  emit("handleSave");
};
const handleOut = () => {
  emit("handleOut");
};
const handleCancel = () => {
  emit("handleCancel");
};

</script>
<style scoped lang="less">
.dialog-header {
  text-align: center;
  padding-bottom: 16px;
  font-family: PingFangSC-Medium;
  font-weight: 500;
  font-size: 18px;
  color: #262626;
}
.dialog-main {
  margin-bottom: 12px;
  box-sizing: border-box;
  .dialog-content {
    text-align: center;
    font-family: PingFangSC-Regular;
    font-weight: 400;
    font-size: 16px;
    color: #262626;
  }
}
.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  .dialog-btn {
    width: 100px;
    height: 40px;
    background: #2776ff;
    border-radius: 8px;
    font-family: PingFangSC-Regular;
    font-weight: 400;
    font-size: 14px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
}
</style>
